package com.abner.design.patterns.factory.absfactory.order;


import com.abner.design.patterns.factory.absfactory.pizza.BjCheesePizza;
import com.abner.design.patterns.factory.absfactory.pizza.BjPepperPizza;
import com.abner.design.patterns.factory.absfactory.pizza.Pizza;

/**
 * 北京工厂类
 * @author abner
 */
public class BjFactory implements AbsFactory {

	@Override
	public Pizza makePizza(String orderType) {
		Pizza pizza = null;
		if("cheese".equals(orderType)) {
			pizza = new BjCheesePizza();
		} else if ("pepper".equals(orderType)){
			pizza = new BjPepperPizza();
		}
		return pizza;
	}
}
